<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/180x180a.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/32x32a.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/32x32a.png?v=5.1.4">


  <link rel="mask-icon" href="/images/180x180.svg?v=5.1.4" color="#222">


  <link rel="manifest" href="/images/manifest.json">




  <meta name="keywords" content="杂项,">





  <link rel="alternate" href="/atom.xml" title="AbelChe's Blog" type="application/atom+xml">






<meta name="description" content="这是一张单纯的图片题目地址http://120.24.86.145:8002/misc/1.jpg 将图片保存下来，直接notpad++查看下，发现末尾有一串 Unicode解码后的到key{you are right} 隐写题目地址http://ctf.bugku.com/files/f8da9b5979e89e91d083c7accdea4427/2.rar 一个压缩包，里面是一张.png的图">
<meta name="keywords" content="杂项">
<meta property="og:type" content="article">
<meta property="og:title" content="WP-Bugku-杂项系列">
<meta property="og:url" content="http://AbelChe.com/2018/08/26/Writeup/WP-Bugku-杂项系列/index.html">
<meta property="og:site_name" content="AbelChe&#39;s Blog">
<meta property="og:description" content="这是一张单纯的图片题目地址http://120.24.86.145:8002/misc/1.jpg 将图片保存下来，直接notpad++查看下，发现末尾有一串 Unicode解码后的到key{you are right} 隐写题目地址http://ctf.bugku.com/files/f8da9b5979e89e91d083c7accdea4427/2.rar 一个压缩包，里面是一张.png的图">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://i.imgur.com/9NdW2yb.png">
<meta property="og:image" content="https://i.imgur.com/l4YOcnP.png">
<meta property="og:image" content="https://i.imgur.com/hF9cNrj.png">
<meta property="og:image" content="https://i.imgur.com/F9kxb7Y.png">
<meta property="og:image" content="https://i.imgur.com/Eao2ZCH.png">
<meta property="og:image" content="https://i.imgur.com/DtuESFV.png">
<meta property="og:image" content="https://i.imgur.com/r0xMz6X.png">
<meta property="og:image" content="https://i.imgur.com/ftqSTAK.png">
<meta property="og:image" content="https://i.imgur.com/yc7K9hi.png">
<meta property="og:image" content="https://i.imgur.com/yiz4PTU.png">
<meta property="og:image" content="https://i.imgur.com/wnUOqW7.png">
<meta property="og:image" content="https://i.imgur.com/c7zUD0U.png">
<meta property="og:image" content="https://i.imgur.com/wnxCabR.png">
<meta property="og:image" content="https://i.imgur.com/tGrk6jY.png">
<meta property="og:image" content="https://i.imgur.com/4HfLLeH.png">
<meta property="og:image" content="https://i.imgur.com/E1VlWV1.png">
<meta property="og:image" content="https://i.imgur.com/TBEoJSQ.png">
<meta property="og:image" content="https://i.imgur.com/jxex9qD.png">
<meta property="og:image" content="https://i.imgur.com/Xsi5dud.png">
<meta property="og:image" content="https://i.imgur.com/RmtHpxb.png">
<meta property="og:image" content="https://i.imgur.com/MZNh7fT.png">
<meta property="og:image" content="https://i.imgur.com/gVIeM3P.png">
<meta property="og:image" content="https://i.imgur.com/uhxthkv.png">
<meta property="og:image" content="https://i.imgur.com/Qk5Eju4.png">
<meta property="og:image" content="https://i.imgur.com/mk4w5R9.png">
<meta property="og:image" content="https://i.imgur.com/1wIgm0O.png">
<meta property="og:image" content="https://i.imgur.com/MqoAoYq.png">
<meta property="og:image" content="https://i.imgur.com/LDORkoV.png">
<meta property="og:image" content="https://i.imgur.com/IZS9cP8.png">
<meta property="og:image" content="https://i.imgur.com/ZsNBoQG.png">
<meta property="og:image" content="https://i.imgur.com/3O78QAI.png">
<meta property="og:image" content="https://i.imgur.com/1OFwGmJ.png">
<meta property="og:image" content="https://i.imgur.com/36H9LAD.png">
<meta property="og:image" content="https://i.imgur.com/nL6gEd7.png">
<meta property="og:image" content="https://i.imgur.com/kBlvHpt.png">
<meta property="og:image" content="https://i.imgur.com/AFwLLYy.png">
<meta property="og:image" content="https://i.imgur.com/kNUbPHE.png">
<meta property="og:image" content="https://i.imgur.com/qRFNQhC.png">
<meta property="og:image" content="https://i.imgur.com/5QO0dmh.png">
<meta property="og:image" content="https://i.imgur.com/R5Q81Ue.png">
<meta property="og:image" content="https://i.imgur.com/fQDcyNX.png">
<meta property="og:updated_time" content="2019-08-15T11:02:50.014Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="WP-Bugku-杂项系列">
<meta name="twitter:description" content="这是一张单纯的图片题目地址http://120.24.86.145:8002/misc/1.jpg 将图片保存下来，直接notpad++查看下，发现末尾有一串 Unicode解码后的到key{you are right} 隐写题目地址http://ctf.bugku.com/files/f8da9b5979e89e91d083c7accdea4427/2.rar 一个压缩包，里面是一张.png的图">
<meta name="twitter:image" content="https://i.imgur.com/9NdW2yb.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"hide","offset":12,"b2t":false,"scrollpercent":true,"onmobile":true},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"slideLeftIn","post_header":"fadeIn","post_body":"fadeIn","coll_header":"fadeIn","sidebar":"slideDownIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://AbelChe.com/2018/08/26/Writeup/WP-Bugku-杂项系列/">





  <title>WP-Bugku-杂项系列 | AbelChe's Blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta custom-logo">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">AbelChe's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description">Youth means limitless possibilities.</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-在线运行">
          <a href="/runcode/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-code"></i> <br>
            
            在线运行
          </a>
        </li>
      
        
        <li class="menu-item menu-item-友链">
          <a href="/friends/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-at"></i> <br>
            
            友链
          </a>
        </li>
      
        
        <li class="menu-item menu-item-sitemap">
          <a href="/sitemap.xml" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br>
            
            站点地图
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>

<link rel="manifest" href="/manifest.json">

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://AbelChe.com/2018/08/26/Writeup/WP-Bugku-杂项系列/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="AbelChe">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/uploads/images/head.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="AbelChe's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">WP-Bugku-杂项系列</h2>
        

        <div class="post-meta">
          
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-08-26T11:26:27+08:00">
                2018-08-26
              </time>
            

            
              <span class="post-meta-divider">|</span>
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-check-o"></i>
              </span>
              
                <span class="post-meta-item-text">更新于&#58;</span>
              
              <time title="更新于" itemprop="dateModified" datetime="2019-08-15T19:02:50+08:00">
                2019-08-15
              </time>
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/WriteUp/" itemprop="url" rel="index">
                    <span itemprop="name">WriteUp</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2018/08/26/Writeup/WP-Bugku-杂项系列/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/2018/08/26/Writeup/WP-Bugku-杂项系列/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i> 阅读数
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1,955 字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  8 分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="这是一张单纯的图片"><a href="#这是一张单纯的图片" class="headerlink" title="这是一张单纯的图片"></a>这是一张单纯的图片</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/1.jpg" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/1.jpg</a></p>
<p>将图片保存下来，直接notpad++查看下，发现末尾有一串<img src="https://i.imgur.com/9NdW2yb.png" alt></p>
<p>Unicode解码后的到key{you are right}</p>
<h1 id="隐写"><a href="#隐写" class="headerlink" title="隐写"></a>隐写</h1><p>题目地址<a href="http://ctf.bugku.com/files/f8da9b5979e89e91d083c7accdea4427/2.rar" target="_blank" rel="noopener">http://ctf.bugku.com/files/f8da9b5979e89e91d083c7accdea4427/2.rar</a></p>
<p>一个压缩包，里面是一张.png的图片<img src="https://i.imgur.com/l4YOcnP.png" alt></p>
<p>用各种工具查看也没什么发现，</p>
<p>后来知道是修改图片的宽高……</p>
<blockquote>
<p>winhex打开后第一行是文件头，固定格式<br>第二行的前四位是宽，后四位是高</p>
</blockquote>
<p>winhex打开<img src="https://i.imgur.com/hF9cNrj.png" alt><br>A4 改为 F4 <img src="https://i.imgur.com/F9kxb7Y.png" alt> </p>
<p>修改成功<img src="https://i.imgur.com/Eao2ZCH.png" alt></p>
<h1 id="telnet"><a href="#telnet" class="headerlink" title="telnet"></a>telnet</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/telnet/1.zip" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/telnet/1.zip</a></p>
<p>wireshark打开，查看tcp数据流<img src="https://i.imgur.com/DtuESFV.png" alt><br><img src="https://i.imgur.com/r0xMz6X.png" alt></p>
<p>得到flag{d316759c281bf925d600be698a4973d5}</p>
<h1 id="眼见非实-ISCCCTF"><a href="#眼见非实-ISCCCTF" class="headerlink" title="眼见非实(ISCCCTF)"></a>眼见非实(ISCCCTF)</h1><p>题目地址<a href="http://ctf.bugku.com/files/919ee4ea1658c3e3ef8b59b67f298470/zip" target="_blank" rel="noopener">http://ctf.bugku.com/files/919ee4ea1658c3e3ef8b59b67f298470/zip</a></p>
<p>下载得到一个名为 zip 的文件，根据文件名的提示，给它加 .zip 的后缀</p>
<p>果然成功打开，打开后发现<img src="https://i.imgur.com/ftqSTAK.png" alt></p>
<p>解压后发现文件错误，本着试一试的原则，后缀名改成 .zip<br>结果还真能打开，压缩包里是<img src="https://i.imgur.com/yc7K9hi.png" alt><br>查看文件，最终在 <em>眼见非实.zip\眼见非实\word\document.xml</em> 这个文件中找到flag<img src="https://i.imgur.com/yiz4PTU.png" alt></p>
<p>flag{F1@g}</p>
<h1 id="又一张图片，还单纯吗"><a href="#又一张图片，还单纯吗" class="headerlink" title="又一张图片，还单纯吗"></a>又一张图片，还单纯吗</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/2.jpg" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/2.jpg</a></p>
<p>保存图片，直接扔 binwalk 里<img src="https://i.imgur.com/wnUOqW7.png" alt><br>foremost 分离后直接得到flag的图片<img src="https://i.imgur.com/c7zUD0U.png" alt></p>
<h1 id="猜"><a href="#猜" class="headerlink" title="猜"></a>猜</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/cai/QQ20170221-132626.png" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/cai/QQ20170221-132626.png</a></p>
<p>题目提示flag是某人名字全拼</p>
<p>图片又是一张不全的照片<br>直接百度识图，搜到原图<img src="https://i.imgur.com/wnxCabR.png" alt></p>
<p>key{liuyifei}</p>
<h1 id="宽带信息泄露"><a href="#宽带信息泄露" class="headerlink" title="宽带信息泄露"></a>宽带信息泄露</h1><p>题目地址<a href="http://ctf.bugku.com/files/5986768ca8b96cead45aec16a88431b5/conf.bin" target="_blank" rel="noopener">http://ctf.bugku.com/files/5986768ca8b96cead45aec16a88431b5/conf.bin</a></p>
<p>上网搜索得知需要用 <a href="http://www.nirsoft.net/toolsdownload/routerpassview.zip" target="_blank" rel="noopener">RouterPassView</a> 这个软件打开<img src="https://i.imgur.com/tGrk6jY.png" alt></p>
<h1 id="隐写2"><a href="#隐写2" class="headerlink" title="隐写2"></a>隐写2</h1><p>题目地址<a href="http://ctf.bugku.com/files/af49803469dfdabb80acf562f9381335/Welcome_.jpg" target="_blank" rel="noopener">http://ctf.bugku.com/files/af49803469dfdabb80acf562f9381335/Welcome_.jpg</a></p>
<p>把这张傻子图扔到binwalk上<img src="https://i.imgur.com/4HfLLeH.png" alt><br>foremost分开，有一个压缩包，里面有一个加密的压缩包和一张图片<img src="https://i.imgur.com/E1VlWV1.png" alt><br>分析提示，三个数，一个国王，一个女神，一个骑士，又说斗地主……那不就….还是直接暴力破解吧</p>
<p>先做个字典000~999,写了个垃圾的py(但是能用啊)</p>
<figure class="highlight sas"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">filename</span> = <span class="string">"num.txt"</span></span><br><span class="line">for <span class="meta">x</span> <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">    for y <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">        for z <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">            with<span class="meta"> open(</span><span class="meta">filename</span>, <span class="string">"a"</span>) <span class="meta">as</span> file_obj:</span><br><span class="line">                file_obj.write(str(<span class="meta">x</span>)+str(y)+str(z)+<span class="string">'\n'</span>)</span><br><span class="line">file_obj<span class="meta">.close(</span>)</span><br></pre></td></tr></table></figure>

<p>暴力破解，试了好多，终于找到一个速度快又好用的工具<a href="http://dl-t1.wmzhe.com/15/15056/Advanced%20Archive%20Password%20Recovery%204.54.exe" target="_blank" rel="noopener">Advanced Archive Password Recovery</a><br>密码871<img src="https://i.imgur.com/TBEoJSQ.png" alt></p>
<p>拿到图片，notpad++打开得到f1@g{eTB1IEFyZSBhIGhAY2tlciE=}</p>
<p>提交发现不正确！还要解密….<br>base64解密 eTB1IEFyZSBhIGhAY2tlciE= 得到y0u Are a h@cker!<br>最后输入flag{y0u Are a h@cker!}</p>
<h1 id="多种方法解决"><a href="#多种方法解决" class="headerlink" title="多种方法解决"></a>多种方法解决</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/3.zip" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/3.zip</a></p>
<p>下载后打开两次会报错，然后就好了，不知道是题目的原因还是真出错了….</p>
<p>得到一个<img src="https://i.imgur.com/jxex9qD.png" alt><br>打不开，后缀改成 .txt 打开是提示图片格式和一长串 base64<br>那就base64转图片解密<br>得到一张二维码<img src="https://i.imgur.com/Xsi5dud.png" alt></p>
<p>识别后得到KEY{dca57f966e4e4e31fd5b15417da63269}</p>
<h1 id="linux"><a href="#linux" class="headerlink" title="linux"></a>linux</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/1.tar.gz" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/1.tar.gz</a></p>
<p>不知道这道题怎么出的，解压，直接notepad++查看文件搜索 key 就得到key{feb81d3834e2423c9903f4755464060b}</p>
<h1 id="中国菜刀"><a href="#中国菜刀" class="headerlink" title="中国菜刀"></a>中国菜刀</h1><p>题目地址<a href="http://ctf.bugku.com/files/047cefd48389dfc5bdc055d348bbf520/caidao.zip" target="_blank" rel="noopener">http://ctf.bugku.com/files/047cefd48389dfc5bdc055d348bbf520/caidao.zip</a></p>
<p>多点几次打开压缩包解压</p>
<p>wireshark打开caidao.pcapng<br>查看tcp流发现有压缩包文件</p>
<p>扔到kali中<code>binwalk 文件 -e</code>得到一个文件，添加后缀.tar，打开<img src="https://i.imgur.com/RmtHpxb.png" alt><br>得到key{8769fe393f2b998fa6a11afe2bfcd65e}</p>
<h1 id="这么多数据包"><a href="#这么多数据包" class="headerlink" title="这么多数据包"></a>这么多数据包</h1><p>题目地址<a href="http://ctf.bugku.com/files/425d97c3a1a2fa32dcead0ddd90467c0/CTF.pcapng.zip" target="_blank" rel="noopener">http://ctf.bugku.com/files/425d97c3a1a2fa32dcead0ddd90467c0/CTF.pcapng.zip</a></p>
<p>这道题给的数据包非常多，上网找答案</p>
<blockquote>
<p>发现有很多包，快速浏览后发现前面都是攻击机(192.168.116.138)在向目标机(192.168.116.159)进行端口扫描，再往后看到5542已经getshell，追踪TCP数据流，发现txt文件</p>
</blockquote>
<p><img src="https://i.imgur.com/MZNh7fT.png" alt><br>base64 解码得到 CCTF{do_you_like_sniffer}</p>
<h1 id="做个游戏-08067CTF"><a href="#做个游戏-08067CTF" class="headerlink" title="做个游戏(08067CTF)"></a>做个游戏(08067CTF)</h1><p>题目地址<a href="http://ctf.bugku.com/files/465585c655e201384823f64342cfd554/heiheihei.jar" target="_blank" rel="noopener">http://ctf.bugku.com/files/465585c655e201384823f64342cfd554/heiheihei.jar</a></p>
<p>打开后是一个小游戏，</p>
<p>那么Java反编译(推荐<a href="http://jd.benow.ca/" target="_blank" rel="noopener">Java Decompiler</a>)</p>
<p><img src="https://i.imgur.com/gVIeM3P.png" alt>找到flag{RGFqaURhbGlfSmlud2FuQ2hpamk=}</p>
<p>将RGFqaURhbGlfSmlud2FuQ2hpamk=进行base64解码得到DajiDali_JinwanChiji</p>
<h1 id="想蹭网先解开密码"><a href="#想蹭网先解开密码" class="headerlink" title="想蹭网先解开密码"></a>想蹭网先解开密码</h1><p>题目地址<a href="http://ctf.bugku.com/files/77decd384a172b9a2294e6c6acfd48cc/wifi.cap" target="_blank" rel="noopener">http://ctf.bugku.com/files/77decd384a172b9a2294e6c6acfd48cc/wifi.cap</a></p>
<p>文件是.cap，扔到wireshark里看一下，基本上都是802.11协议的包，WiFi认证过程重点在WPA的四次握手包，也就是eapol协议的包，过滤一下<img src="https://i.imgur.com/uhxthkv.png" alt></p>
<p>aircrack-ng 进行破解<br>先生成字典</p>
<figure class="highlight sas"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">filename</span> = <span class="string">"num.txt"</span></span><br><span class="line">for <span class="meta">x</span> <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">    for y <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">        for z <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">            for n <span class="meta">in</span><span class="meta"> range(</span>10):</span><br><span class="line">                with<span class="meta"> open(</span><span class="meta">filename</span>, <span class="string">"a"</span>) <span class="meta">as</span> file_obj:</span><br><span class="line">                    file_obj.write(<span class="string">'1391040'</span>+str(<span class="meta">x</span>)+str(y)+str(z)+str(n)+<span class="string">'\n'</span>)</span><br><span class="line">file_obj<span class="meta">.close(</span>)</span><br></pre></td></tr></table></figure>

<p><code>aircrack-ng -w num.txt wifi.cap</code>开始破解</p>
<p><img src="https://i.imgur.com/Qk5Eju4.png" alt></p>
<h1 id="Linux2"><a href="#Linux2" class="headerlink" title="Linux2"></a>Linux2</h1><p>题目地址:链接: <a href="http://pan.baidu.com/s/1skJ6t7R" target="_blank" rel="noopener">http://pan.baidu.com/s/1skJ6t7R</a> 密码: s7jy</p>
<p>又是linux，以bugku一贯的niaoxing，搜索<code>key</code>然后……然后就找到了….<img src="https://i.imgur.com/mk4w5R9.png" alt></p>
<h1 id="账号被盗了"><a href="#账号被盗了" class="headerlink" title="账号被盗了"></a>账号被盗了</h1><p>题目地址<a href="http://120.24.86.145:9001/" target="_blank" rel="noopener">http://120.24.86.145:9001/</a></p>
<p>打开题目后发现一个按钮，点击后跳出<img src="https://i.imgur.com/1wIgm0O.png" alt></p>
<p>第一反应bp抓包改包</p>
<p>这里的false改为true即可<img src="https://i.imgur.com/MqoAoYq.png" alt></p>
<p>然后跳出一个链接，进入后保存文件发现是一个cf刷枪的程序</p>
<p>wireshark抓包，账号密码随便填写，提交，抓到后查看TCP数据流，<img src="https://i.imgur.com/LDORkoV.png" alt></p>
<p>都是base64，解码后得到用户名和密码，发现是网易邮箱</p>
<p>登陆后在邮件草稿里能看到flag(要是flag提交不了就是有人恶搞了，没办法)</p>
<h1 id="细心的大象"><a href="#细心的大象" class="headerlink" title="细心的大象"></a>细心的大象</h1><p>题目地址<a href="https://share.weiyun.com/9287be0a629971ac53d97f39727eee18" target="_blank" rel="noopener">https://share.weiyun.com/9287be0a629971ac53d97f39727eee18</a></p>
<p>压缩包里有一张图片，扔到binwalk上发现<img src="https://i.imgur.com/IZS9cP8.png" alt></p>
<p>分离后是一个压缩包，里面有第二张图片但是需要密码，<br>查看了下图片1的属性，果然找到了备注一串字符<img src="https://i.imgur.com/ZsNBoQG.png" alt><br>一看就是经过base64加密的，拿去解密后就是图片2的密码</p>
<p>查看图片2发现是500px<em>420px，<br>为啥不是500px</em>500px呢？</p>
<p>用winhex打开将标记的A4修改为F4 <img src="https://i.imgur.com/3O78QAI.png" alt></p>
<p>打开就会发现flag<img src="https://i.imgur.com/1OFwGmJ.png" alt></p>
<h1 id="爆照-08067CTF"><a href="#爆照-08067CTF" class="headerlink" title="爆照(08067CTF)"></a>爆照(08067CTF)</h1><p>题目地址<a href="http://ctf.bugku.com/files/fa88c409b367aa9243313a85d138d183/8.jpg" target="_blank" rel="noopener">http://ctf.bugku.com/files/fa88c409b367aa9243313a85d138d183/8.jpg</a></p>
<p>一张穹妹的图片，binwalk扫一下后<img src="https://i.imgur.com/36H9LAD.png" alt></p>
<p>分离后得到一个压缩包<img src="https://i.imgur.com/nL6gEd7.png" alt></p>
<p>notepad++查看后发下头部有jfif的标记，将文件添加后缀.jfif转换成图片后发现88.jfif有个两个二维码一个能扫出来一个扫不出来<img src="https://i.imgur.com/kBlvHpt.png" alt><br>扫码是一串字符 bilibili</p>
<p>剩下的扔到kali上binwalk跑，发现8888.jfif有压缩包，foremost分离后解压会得到一个二维码<img src="https://i.imgur.com/AFwLLYy.png" alt><br>扫码后得到一串字符panama</p>
<p>继续binwalk会发现后面的图片是正常的</p>
<p>剩下的只有之前的888.jfif有修改的痕迹，<img src="https://i.imgur.com/kNUbPHE.png" alt><br>foremost分离出一张.jpg的图片<br>果然在备注中发现了<img src="https://i.imgur.com/qRFNQhC.png" alt><br>base64解码后得到silisili</p>
<p>按名称排序flag{bilibili_silisili_panama}</p>
<h1 id="流量分析-cnss"><a href="#流量分析-cnss" class="headerlink" title="流量分析(cnss)"></a>流量分析(cnss)</h1><p>题目地址<a href="http://ctf.bugku.com/files/7f9a18ccd16fa1c52f3fad835ad8df8e/1490637625.pcapng" target="_blank" rel="noopener">http://ctf.bugku.com/files/7f9a18ccd16fa1c52f3fad835ad8df8e/1490637625.pcapng</a></p>
<p>用wireshark打开后分析Tcp数据流 <img src="https://i.imgur.com/5QO0dmh.png" alt><br>发现<br><a href="http://space.bilibili.com/17190571/" target="_blank" rel="noopener">http://space.bilibili.com/17190571/</a><br>这个用户，那么打开访问一下发现<img src="https://i.imgur.com/R5Q81Ue.png" alt></p>
<p>拿去base64解码后发现好像不对啊，上网查了下wp发下好像是被别人搞了</p>
<p>没办法，总之这道题base64解码两次就ok了</p>
<p>这是flag<br>cnss{b1libil1_A_gay_wEbsite}</p>
<h1 id="猫片-安恒"><a href="#猫片-安恒" class="headerlink" title="猫片(安恒)"></a><font color="red">猫片(安恒)</font></h1><p>题目地址<a href="http://ctf.bugku.com/files/9f1bebac6b8282da716720cc99f35bed/png" target="_blank" rel="noopener">http://ctf.bugku.com/files/9f1bebac6b8282da716720cc99f35bed/png</a></p>
<p>一个名叫png的文件，给他加个.png的后缀，变成一个图片</p>
<p>扔到binwalk上看下，没有问题</p>
<p>涉及的东西有点多先放一下<a href="https://blog.csdn.net/x947955250/article/details/81482471" target="_blank" rel="noopener">https://blog.csdn.net/x947955250/article/details/81482471</a></p>
<h1 id="妹子的陌陌"><a href="#妹子的陌陌" class="headerlink" title="妹子的陌陌"></a>妹子的陌陌</h1><p>题目地址<a href="http://120.24.86.145:8002/misc/momo.jpg" target="_blank" rel="noopener">http://120.24.86.145:8002/misc/momo.jpg</a></p>
<p>下载后是一张照片binwalk发现有压缩包，改后缀.zip打开有一个.txt文件，需要密码解压，图片上有<code>喜欢我吗.</code>五个字符，密码就是这个</p>
<p>解压后得到<img src="https://i.imgur.com/fQDcyNX.png" alt></p>
<p>解密第一个摩斯密码得到HTTP//ENCODE.CHAHUO.COM/<br>构造成url<br><a href="HTTP://ENCODE.CHAHUO.COM/" target="_blank" rel="noopener">HTTP://ENCODE.CHAHUO.COM/</a></p>
<p>在这个网站中选择AES解密U2FsdGVkX18tl8Yi7FaGiv6jK1SBxKD30eYb52onYe0=</p>
<p>得到momoj2j.png</p>
<p>访问<br><a href="http://c.bugku.com/momoj2j.png" target="_blank" rel="noopener">http://c.bugku.com/momoj2j.png</a></p>
<p>得到二维码，扫描后得到flag，要是扫不出来就将图片反相做一下再扫</p>

      
    </div>
    
    
    

    
      <div>
        <div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
    <img id="wechat_subscriber_qcode" src="/uploads/images/wechatQR_2.JPG" alt="AbelChe wechat" style="width: 200px; max-width: 100%;">
    <div>扫码加微信</div>
</div>

      </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>Donate here!!!</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.png" alt="AbelChe 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.png" alt="AbelChe 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者：</strong>
    AbelChe
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://AbelChe.com/2018/08/26/Writeup/WP-Bugku-杂项系列/" title="WP-Bugku-杂项系列">http://AbelChe.com/2018/08/26/Writeup/WP-Bugku-杂项系列/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>
    本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处！
  </li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/杂项/" rel="tag"># 杂项</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/08/26/Writeup/WP-Bugku-Web进阶系列/" rel="next" title="WP-Bugku-Web进阶系列">
                <i class="fa fa-chevron-left"></i> WP-Bugku-Web进阶系列
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/09/20/Writeup/WP-DLCTF2018/" rel="prev" title="WP-DLCTF2018">
                WP-DLCTF2018 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <a href="/"><img class="site-author-image" itemprop="image" src="/uploads/images/head.png" alt="AbelChe"></a>
            
              <a href="/"><p class="site-author-name" itemprop="name">AbelChe</p></a>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">65</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">13</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">81</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/AbelChe" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://coding.net/u/AbelChe" target="_blank" title="Coding">
                      
                        <i class="fa fa-fw fa-bullseye"></i>Coding</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://gitee.com/abelche" target="_blank" title="Gitee">
                      
                        <i class="fa fa-fw fa-codepen"></i>Gitee</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.aliyun.com" target="_blank" title="Aliyun">
                      
                        <i class="fa fa-fw fa-cloud"></i>Aliyun</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://mail.qq.com" target="_blank" title="QQ_mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>QQ_mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="http://mail.google.com/mail/" target="_blank" title="Gmail">
                      
                        <i class="fa fa-fw fa-google"></i>Gmail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://twitter.com/AbelChe7" target="_blank" title="Twitter">
                      
                        <i class="fa fa-fw fa-twitter"></i>Twitter</a>
                  </span>
                
            </div>
          

          
          
            <div class="cc-license motion-element" itemprop="license">
              <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" target="_blank">
                <img src="/images/cc-by-nc-sa.svg" alt="Creative Commons">
              </a>
            </div>
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                LINKS
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.baidu.com" title="Baidu" target="_blank">Baidu</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.google.com" title="Google" target="_blank">Google</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.csdn.net" title="CSDN" target="_blank">CSDN</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bilibili.com" title="Bilibili" target="_blank">Bilibili</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.taobao.com" title="Taobao" target="_blank">Taobao</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000" title="Python Learning" target="_blank">Python Learning</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#这是一张单纯的图片"><span class="nav-number">1.</span> <span class="nav-text">这是一张单纯的图片</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#隐写"><span class="nav-number">2.</span> <span class="nav-text">隐写</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#telnet"><span class="nav-number">3.</span> <span class="nav-text">telnet</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#眼见非实-ISCCCTF"><span class="nav-number">4.</span> <span class="nav-text">眼见非实(ISCCCTF)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#又一张图片，还单纯吗"><span class="nav-number">5.</span> <span class="nav-text">又一张图片，还单纯吗</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#猜"><span class="nav-number">6.</span> <span class="nav-text">猜</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#宽带信息泄露"><span class="nav-number">7.</span> <span class="nav-text">宽带信息泄露</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#隐写2"><span class="nav-number">8.</span> <span class="nav-text">隐写2</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#多种方法解决"><span class="nav-number">9.</span> <span class="nav-text">多种方法解决</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#linux"><span class="nav-number">10.</span> <span class="nav-text">linux</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#中国菜刀"><span class="nav-number">11.</span> <span class="nav-text">中国菜刀</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#这么多数据包"><span class="nav-number">12.</span> <span class="nav-text">这么多数据包</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#做个游戏-08067CTF"><span class="nav-number">13.</span> <span class="nav-text">做个游戏(08067CTF)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#想蹭网先解开密码"><span class="nav-number">14.</span> <span class="nav-text">想蹭网先解开密码</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Linux2"><span class="nav-number">15.</span> <span class="nav-text">Linux2</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#账号被盗了"><span class="nav-number">16.</span> <span class="nav-text">账号被盗了</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#细心的大象"><span class="nav-number">17.</span> <span class="nav-text">细心的大象</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#爆照-08067CTF"><span class="nav-number">18.</span> <span class="nav-text">爆照(08067CTF)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#流量分析-cnss"><span class="nav-number">19.</span> <span class="nav-text">流量分析(cnss)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#猫片-安恒"><span class="nav-number">20.</span> <span class="nav-text">猫片(安恒)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#妹子的陌陌"><span class="nav-number">21.</span> <span class="nav-text">妹子的陌陌</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">AbelChe</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">43.8k</span>
  
</div>


<!--
  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>
-->








        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i> 访问人数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i> 总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    
      <div id="needsharebutton-float">
        <span class="btn">
          <i class="fa fa-share-alt" aria-hidden="true"></i>
        </span>
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item=>{
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: '3dNwvfMcT2yQEr3TkP1gFUbT-gzGzoHsz',
        appKey: 'bjkjOibLdLJcGGrHkTXWeXpA',
        placeholder: 'Just go go',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
    
      flOptions = {};
      
          flOptions.iconStyle = "box";
      
          flOptions.boxForm = "horizontal";
      
          flOptions.position = "middleRight";
      
          flOptions.networks = "Weibo,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-float', flOptions);
    
  </script>

  

  

  
  <script type="text/javascript" src="/js/src/js.cookie.js?v=5.1.4"></script>
  <script type="text/javascript" src="/js/src/scroll-cookie.js?v=5.1.4"></script>


  
  <script type="text/javascript" src="/js/src/exturl.js?v=5.1.4"></script>


</body>
</html>
